#ifndef MAINWINDOW_H
#define MAINWINDOW_H
 #include <QListWidgetItem>
#include <QtGui/QMainWindow>
 #include <QGLWidget>
 #include <QMouseEvent>
 #include <QThread>
 #include <QTimer>
#include "pozicijas.h"
#include "cubegrammar.h"


class MyThread : public QThread
 {
 public:
    char poz[24];
    char rez[24];
     int cuberesult;
     void run();
 };



namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    //kubs *  mykubs;
      typedef std::string::const_iterator iterator_type;
 typedef client::calculator<iterator_type  > calculator;
int gradient;
unsigned timerticks;
 MyThread * thread;
 QTimer * timeline;
   pozicijas * mypozicijas;
void attgajienus(int ieprg);
 calculator * calc;
public slots:
    void updtab();
        void salikt();
        void getpoz();
        void labpoz();
        void delpoz();
        void gajatp();
        void gajpr(int gaj);
       void setpoz( QListWidgetItem * item);
       void savetofiles();
       void simbs();
       void simpbs();
       void saktmeklet();
       void beidzis();
       void timeticked();


void readfromfiles();


private:
    Ui::MainWindow *ui;



private slots:

    void on_formb_clicked();
    void on_actionsalidz_triggered();
    void on_actionkomb_triggered();
};

#endif // MAINWINDOW_H
